From 68014ab8b76d4e75ce536203a72e0b8272e19f31 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 4 Oct 2015 12:02:33 -0700 Subject: [PATCH] Don't bother sorting build scripts Turns out the tests don't actually need this "more deterministic" output and it was also showing up relatively high in profiles (e.g. ~15% of a noop runtime) so if this is necessary let's find a better way! --- src/cargo/ops/cargo_rustc/custom_build.rs | 8 -------- tests/test_cargo_test.rs | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/cargo/ops/cargo_rustc/custom_build.rs b/src/cargo/ops/cargo_rustc/custom_build.rs index 7967a1a4d..1232fa9c2 100644 --- a/src/cargo/ops/cargo_rustc/custom_build.rs +++ b/src/cargo/ops/cargo_rustc/custom_build.rs @@ -338,14 +338,6 @@ pub fn build_map<'b, 'cfg>(cx: &mut Context<'b, 'cfg>, for unit in units { build(&mut ret, cx, unit); } - - // Make the output a little more deterministic by sorting all dependencies - for (_, slot) in ret.iter_mut() { - slot.to_link.sort_by(|a, b| a.0.cmp(&b.0)); - slot.to_link.dedup(); - slot.plugins.sort(); - slot.plugins.dedup(); - } cx.build_scripts.extend(ret.into_iter().map(|(k, v)| { (k, Arc::new(v)) })); diff --git a/tests/test_cargo_test.rs b/tests/test_cargo_test.rs index 9e9cd678e..7a269f26a 100644 --- a/tests/test_cargo_test.rs +++ b/tests/test_cargo_test.rs @@ -2017,7 +2017,7 @@ test!(bin_does_not_rebuild_tests { execs().with_status(0) .with_stdout(&format!("\ {compiling} foo v0.0.1 ([..]) -{running} `rustc src/main.rs [..]` -{running} `rustc src/main.rs [..]` +{running} `rustc src[..]main.rs [..]` +{running} `rustc src[..]main.rs [..]` ", compiling = COMPILING, running = RUNNING))); }); -- 2.30.2